using DevExpress.Utils;
using DevExpress.XtraBars;
using DevExpress.XtraEditors;
using DevExpress.XtraLayout;
using DevExpress.XtraLayout.Utils;
using Common.Class;
using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
namespace Common.Base
{
	public class xucBasicListSearchProduct : XucBase
	{
		private ListType _listType = ListType.General;
		protected RowClickEventArgs RowClick = new RowClickEventArgs();
		private IContainer components = null;
		protected ImageCollection imageCollection2;
		private BarButtonItem biiAdd;
		private BarButtonItem biiSave;
		private BarButtonItem bbiPrint;
		protected LayoutControl layoutControl1;
		protected LayoutControlGroup layoutControlGroup1;
		protected SplitterItem splitterItem1;
		private XucBaseBarD ucToolBar;
		protected LayoutControlItem layoutControlItem2;
		protected LayoutControlGroup layoutControlGroup2;
		protected LayoutControlGroup layoutControlGroup3;
		public event ButtonClickEventHander AddNewClick;
		public DateTime From
		{
			get
			{
				return this.Bar.From;
			}
			private set
			{
				this.Bar.From = value;
			}
		}
		public DateTime To
		{
			get
			{
				return this.Bar.To;
			}
			private set
			{
				this.Bar.To = value;
			}
		}
		public ListType ListStyle
		{
			get
			{
				return this._listType;
			}
			set
			{
				this._listType = value;
			}
		}
		public XucBaseBarD Bar
		{
			get
			{
				return this.ucToolBar;
			}
		}
		public xucBasicListSearchProduct()
		{
			this.InitializeComponent();
		}
		public void Init()
		{
			this.Bar.ViewClick += new ButtonClickEventHander(this.UcToolBarViewClick);
			this.Bar.ExportClick += new ButtonClickEventHander(this.UcToolBarExportClick);
			this.Bar.PrintClick += new ButtonClickEventHander(this.UcToolBarPrintClick);
			this.Bar.EditClick += new ButtonClickEventHander(this.UcToolBarEditClick);
			this.Bar.DeleteClick += new ButtonClickEventHander(this.UcToolBarDeleteClick);
			this.Bar.AddClick += new ButtonClickEventHander(this.UcToolBarAddClick);
			this.Bar.DetailClick += new ButtonClickEventHander(this.UcToolBarDetailClick);
			this.Bar.HelpClick += new ButtonClickEventHander(this.ucToolBar_HelpClick);
			this.Bar.CloseClick += new ButtonClickEventHander(this.UcToolBarCloseClick);
			this.Bar.ProductDetailClick += new ButtonClickEventHander(this.UcToolBarProductDetailClick);
			this.Bar.HistoryClick += new ButtonClickEventHander(this.UcToolBarHistoryClick);
			this.Bar.InventoryClick += new ButtonClickEventHander(this.UcToolBarInventoryClick);
			this.Bar.DetailHistoryClick += new ButtonClickEventHander(this.UcToolBarDetailHistoryClick);
			this.Bar.DetailInventoryClick += new ButtonClickEventHander(this.UcToolBarDetailInventoryClick);
			this.Bar.DetailProductClick += new ButtonClickEventHander(this.UcToolBarDetailProductClick);
			this.Bar.CopyClick += new ButtonClickEventHander(this.UcToolBarCopyClick);
			this.Bar.MirrorClick += new ButtonClickEventHander(this.UcToolBarMirrorClick);
			this.Bar.StockChanged += new XucBaseBarD.StockChangedEventHander(this.Bar_StockChanged);
			this.DisableMenu(true);
			this.From = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1);
			this.To = this.From.AddMonths(1).AddDays(-1.0);
			this.Bar.ShowProduct();
			base.DoHide();
		}
		public void Bar_StockChanged(object sender, object value)
		{
			this.Reload();
		}
		private void Bar_CustomColumnClick(object sender)
		{
			this.CustomColumn();
		}
		protected void CustomColumn()
		{
		}
		public void Mirror()
		{
		}
		private void UcToolBarMirrorClick(object sender)
		{
			this.Mirror();
		}
		private void UcToolBarCopyClick(object sender)
		{
			this.Copy();
		}
		protected void Copy()
		{
		}
		private void UcToolBarDetailProductClick(object sender)
		{
			this.DetailProduct();
		}
		private void UcToolBarDetailInventoryClick(object sender)
		{
			this.DetailInventory();
		}
		public void DetailProduct()
		{
		}
		public void DetailInventory()
		{
		}
		public void DetailHistory()
		{
		}
		private void UcToolBarDetailHistoryClick(object sender)
		{
			this.DetailHistory();
		}
		public virtual void Inventory()
		{
		}
		private void UcToolBarInventoryClick(object sender)
		{
			this.Inventory();
		}
		private void UcToolBarHistoryClick(object sender)
		{
			this.History();
		}
		public virtual void ProductDetail()
		{
		}
		public virtual void History()
		{
		}
		private void UcToolBarProductDetailClick(object sender)
		{
			this.ProductDetail();
		}
		private void UcToolBarCloseClick(object sender)
		{
			if (base.ParentForm != null)
			{
				base.ParentForm.Close();
			}
		}
		private void ucToolBar_HelpClick(object sender)
		{
		}
		public virtual void Detail()
		{
		}
		private void UcToolBarDetailClick(object sender)
		{
			this.Detail();
		}
		private void UcToolBarAddClick(object sender)
		{
			this.RaiseAddNewClickEventHander();
		}
		private void UcToolBarDeleteClick(object sender)
		{
			this.Delete();
		}
		private void UcToolBarEditClick(object sender)
		{
			this.Edit();
		}
		private void UcToolBarPrintClick(object sender)
		{
			this.Print();
		}
		private void UcToolBarExportClick(object sender)
		{
			base.Export();
		}
		private void UcToolBarViewClick(object sender)
		{
			this.Reload();
		}
		protected virtual void Print()
		{
			XtraMessageBox.Show("Don't support.");
		}
		public virtual void Reload()
		{
		}
		public virtual void Delete()
		{
		}
		public virtual void Edit()
		{
		}
		public void DisableMenu(bool disable)
		{
			this.Bar.Bar.bbiCopy.Enabled = !disable;
			this.Bar.Bar.bbiPrint.Enabled = !disable;
			this.Bar.Bar.bbiExport.Enabled = !disable;
			this.Bar.Bar.bbiProduct.Enabled = !disable;
		}
		protected void RaiseAddNewClickEventHander()
		{
			if (this.AddNewClick != null)
			{
				this.AddNewClick(this);
			}
		}
		protected override bool ExportPermision()
		{
			return true;
		}
		protected override void Dispose(bool disposing)
		{
			if (disposing && this.components != null)
			{
				this.components.Dispose();
			}
			base.Dispose(disposing);
		}
		private void InitializeComponent()
		{
			this.components = new Container();
			ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof(xucBasicListSearchProduct));
			MenuButton menuButton = new MenuButton();
			ItemCommand itemCommand = new ItemCommand();
			ItemCommand itemCommand2 = new ItemCommand();
			ItemCommand itemCommand3 = new ItemCommand();
			ItemCommand itemCommand4 = new ItemCommand();
			ItemCommand itemCommand5 = new ItemCommand();
			ItemCommand itemCommand6 = new ItemCommand();
			ItemCommand itemCommand7 = new ItemCommand();
			ItemCommand itemCommand8 = new ItemCommand();
			ItemCommand itemCommand9 = new ItemCommand();
			ItemCommand itemCommand10 = new ItemCommand();
			ItemCommand itemCommand11 = new ItemCommand();
			ItemCommand itemCommand12 = new ItemCommand();
			ItemCommand itemCommand13 = new ItemCommand();
			ItemCommand itemCommand14 = new ItemCommand();
			ItemCommand itemCommand15 = new ItemCommand();
			ItemCommand itemCommand16 = new ItemCommand();
			ItemCommand itemCommand17 = new ItemCommand();
			ItemCommand itemCommand18 = new ItemCommand();
			ItemCommand itemCommand19 = new ItemCommand();
			ItemCommand itemCommand20 = new ItemCommand();
			ItemCommand itemCommand21 = new ItemCommand();
			ItemCommand itemCommand22 = new ItemCommand();
			ItemCommand itemCommand23 = new ItemCommand();
			ItemCommand itemCommand24 = new ItemCommand();
			ItemCommand itemCommand25 = new ItemCommand();
			ItemCommand itemCommand26 = new ItemCommand();
			ItemCommand itemCommand27 = new ItemCommand();
			ItemCommand itemCommand28 = new ItemCommand();
			ItemCommand itemCommand29 = new ItemCommand();
			this.imageCollection2 = new ImageCollection(this.components);
			this.biiAdd = new BarButtonItem();
			this.biiSave = new BarButtonItem();
			this.bbiPrint = new BarButtonItem();
			this.layoutControl1 = new LayoutControl();
			this.ucToolBar = new XucBaseBarD();
			this.layoutControlGroup1 = new LayoutControlGroup();
			this.splitterItem1 = new SplitterItem();
			this.layoutControlGroup2 = new LayoutControlGroup();
			this.layoutControlItem2 = new LayoutControlItem();
			this.layoutControlGroup3 = new LayoutControlGroup();
			((ISupportInitialize)this.imageCollection2).BeginInit();
			((ISupportInitialize)this.layoutControl1).BeginInit();
			this.layoutControl1.SuspendLayout();
			((ISupportInitialize)this.layoutControlGroup1).BeginInit();
			((ISupportInitialize)this.splitterItem1).BeginInit();
			((ISupportInitialize)this.layoutControlGroup2).BeginInit();
			((ISupportInitialize)this.layoutControlItem2).BeginInit();
			((ISupportInitialize)this.layoutControlGroup3).BeginInit();
			base.SuspendLayout();
			this.imageCollection2.ImageStream = (ImageCollectionStreamer)componentResourceManager.GetObject("imageCollection2.ImageStream");
			this.biiAdd.Caption = "Thêm";
			this.biiAdd.Id = 10;
			this.biiAdd.Name = "biiAdd";
			this.biiSave.Caption = "Lưu";
			this.biiSave.Id = 11;
			this.biiSave.Name = "biiSave";
			this.bbiPrint.Caption = "In..";
			this.bbiPrint.Id = 13;
			this.bbiPrint.Name = "bbiPrint";
			this.layoutControl1.Controls.Add(this.ucToolBar);
			this.layoutControl1.Dock = DockStyle.Fill;
			this.layoutControl1.Location = new Point(0, 0);
			this.layoutControl1.Name = "layoutControl1";
			this.layoutControl1.Padding = new System.Windows.Forms.Padding(2);
			this.layoutControl1.Root = this.layoutControlGroup1;
			this.layoutControl1.Size = new Size(961, 681);
			this.layoutControl1.TabIndex = 41;
			this.layoutControl1.Text = "layoutControl1";
			this.ucToolBar.All = false;
			this.ucToolBar.From = new DateTime(2009, 7, 25, 22, 57, 46, 531);
			this.ucToolBar.Id = "";
			this.ucToolBar.IsClose = CloseOrNew.None;
			this.ucToolBar.Location = new Point(1, 1);
			this.ucToolBar.Name = "ucToolBar";
			this.ucToolBar.NotSave = false;
			itemCommand.Caption = "";
			itemCommand.Enable = false;
			itemCommand.Visibility = BarItemVisibility.Never;
			menuButton.Add = itemCommand;
			itemCommand2.Caption = "";
			itemCommand2.Enable = false;
			itemCommand2.Visibility = BarItemVisibility.Never;
			menuButton.Cancel = itemCommand2;
			itemCommand3.Caption = "";
			itemCommand3.Enable = false;
			itemCommand3.Visibility = BarItemVisibility.Never;
			menuButton.Change = itemCommand3;
			itemCommand4.Caption = "";
			itemCommand4.Enable = false;
			itemCommand4.Visibility = BarItemVisibility.Never;
			menuButton.Close = itemCommand4;
			itemCommand5.Caption = "";
			itemCommand5.Enable = false;
			itemCommand5.Visibility = BarItemVisibility.Never;
			menuButton.Custom = itemCommand5;
			itemCommand6.Caption = "";
			itemCommand6.Enable = false;
			itemCommand6.Visibility = BarItemVisibility.Never;
			menuButton.Delete = itemCommand6;
			itemCommand7.Caption = "";
			itemCommand7.Enable = false;
			itemCommand7.Visibility = BarItemVisibility.Never;
			menuButton.Export = itemCommand7;
			itemCommand8.Caption = "";
			itemCommand8.Enable = false;
			itemCommand8.Visibility = BarItemVisibility.Never;
			menuButton.Filter = itemCommand8;
			itemCommand9.Caption = "";
			itemCommand9.Enable = false;
			itemCommand9.Visibility = BarItemVisibility.Never;
			menuButton.FilterCustomer = itemCommand9;
			itemCommand10.Caption = "";
			itemCommand10.Enable = false;
			itemCommand10.Visibility = BarItemVisibility.Never;
			menuButton.FilterStock = itemCommand10;
			itemCommand11.Caption = "";
			itemCommand11.Enable = false;
			itemCommand11.Visibility = BarItemVisibility.Never;
			menuButton.Find = itemCommand11;
			menuButton.GClose = false;
			menuButton.GCommand = false;
			menuButton.GExport = false;
			itemCommand12.Caption = "";
			itemCommand12.Enable = false;
			itemCommand12.Visibility = BarItemVisibility.Never;
			menuButton.Go = itemCommand12;
			menuButton.GOption = false;
			menuButton.GPrint = false;
			menuButton.GRecords = false;
			menuButton.GSearchBar = false;
			menuButton.GSettings = false;
			menuButton.GVaildation = false;
			itemCommand13.Caption = "";
			itemCommand13.Enable = false;
			itemCommand13.Visibility = BarItemVisibility.Never;
			menuButton.Import = itemCommand13;
			itemCommand14.Caption = "";
			itemCommand14.Enable = false;
			itemCommand14.Visibility = BarItemVisibility.Never;
			menuButton.Next = itemCommand14;
			itemCommand15.Caption = "";
			itemCommand15.Enable = false;
			itemCommand15.Visibility = BarItemVisibility.Never;
			menuButton.PageSetup = itemCommand15;
			menuButton.PHome = false;
			itemCommand16.Caption = "";
			itemCommand16.Enable = false;
			itemCommand16.Visibility = BarItemVisibility.Never;
			menuButton.Previous = itemCommand16;
			itemCommand17.Caption = "";
			itemCommand17.Enable = false;
			itemCommand17.Visibility = BarItemVisibility.Never;
			menuButton.Print = itemCommand17;
			itemCommand18.Caption = "";
			itemCommand18.Enable = false;
			itemCommand18.Visibility = BarItemVisibility.Never;
			menuButton.PrintPreview = itemCommand18;
			menuButton.PTool = false;
			itemCommand19.Caption = "";
			itemCommand19.Enable = false;
			itemCommand19.Visibility = BarItemVisibility.Never;
			menuButton.Redo = itemCommand19;
			itemCommand20.Caption = "";
			itemCommand20.Enable = false;
			itemCommand20.Visibility = BarItemVisibility.Never;
			menuButton.Refresh = itemCommand20;
			itemCommand21.Caption = "";
			itemCommand21.Enable = false;
			itemCommand21.Visibility = BarItemVisibility.Never;
			menuButton.Save = itemCommand21;
			itemCommand22.Caption = "";
			itemCommand22.Enable = false;
			itemCommand22.Visibility = BarItemVisibility.Never;
			menuButton.SaveAndClose = itemCommand22;
			itemCommand23.Caption = "";
			itemCommand23.Enable = false;
			itemCommand23.Visibility = BarItemVisibility.Never;
			menuButton.SaveAndNew = itemCommand23;
			itemCommand24.Caption = "";
			itemCommand24.Enable = false;
			itemCommand24.Visibility = BarItemVisibility.Never;
			menuButton.Search = itemCommand24;
			itemCommand25.Caption = "";
			itemCommand25.Enable = false;
			itemCommand25.Visibility = BarItemVisibility.Never;
			menuButton.SearchText = itemCommand25;
			itemCommand26.Caption = "";
			itemCommand26.Enable = false;
			itemCommand26.Visibility = BarItemVisibility.Never;
			menuButton.Task = itemCommand26;
			itemCommand27.Caption = "";
			itemCommand27.Enable = false;
			itemCommand27.Visibility = BarItemVisibility.Never;
			menuButton.Undo = itemCommand27;
			itemCommand28.Caption = "";
			itemCommand28.Enable = false;
			itemCommand28.Visibility = BarItemVisibility.Never;
			menuButton.Vaildate = itemCommand28;
			itemCommand29.Caption = "";
			itemCommand29.Enable = false;
			itemCommand29.Visibility = BarItemVisibility.Never;
			menuButton.View = itemCommand29;
			this.ucToolBar.RibbonBar = menuButton;
			this.ucToolBar.Size = new Size(959, 53);
			this.ucToolBar.Status = Actions.None;
			this.ucToolBar.TabIndex = 41;
			this.ucToolBar.Title = "";
			this.ucToolBar.To = new DateTime(2009, 7, 25, 22, 57, 46, 531);
			this.layoutControlGroup1.CustomizationFormText = "Root";
			this.layoutControlGroup1.GroupBordersVisible = false;
			this.layoutControlGroup1.Items.AddRange(new BaseLayoutItem[]
			{
				this.splitterItem1,
				this.layoutControlGroup2,
				this.layoutControlGroup3
			});
			this.layoutControlGroup1.Location = new Point(0, 0);
			this.layoutControlGroup1.Name = "Root";
			this.layoutControlGroup1.Padding = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0);
			this.layoutControlGroup1.Size = new Size(961, 681);
			this.layoutControlGroup1.Text = "Root";
			this.layoutControlGroup1.TextVisible = false;
			this.splitterItem1.AllowHotTrack = true;
			this.splitterItem1.CustomizationFormText = "splitterItem1";
			this.splitterItem1.Location = new Point(0, 675);
			this.splitterItem1.Name = "splitterItem1";
			this.splitterItem1.Size = new Size(961, 6);
			this.layoutControlGroup2.CustomizationFormText = "layoutControlGroup2";
			this.layoutControlGroup2.GroupBordersVisible = false;
			this.layoutControlGroup2.Items.AddRange(new BaseLayoutItem[]
			{
				this.layoutControlItem2
			});
			this.layoutControlGroup2.Location = new Point(0, 0);
			this.layoutControlGroup2.Name = "layoutControlGroup2";
			this.layoutControlGroup2.Padding = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0);
			this.layoutControlGroup2.Size = new Size(961, 55);
			this.layoutControlGroup2.Text = "layoutControlGroup2";
			this.layoutControlGroup2.TextVisible = false;
			this.layoutControlItem2.Control = this.ucToolBar;
			this.layoutControlItem2.CustomizationFormText = "layoutControlItem2";
			this.layoutControlItem2.Location = new Point(0, 0);
			this.layoutControlItem2.Name = "layoutControlItem2";
			this.layoutControlItem2.Padding = new DevExpress.XtraLayout.Utils.Padding(1, 1, 1, 1);
			this.layoutControlItem2.Size = new Size(961, 55);
			this.layoutControlItem2.Text = "layoutControlItem2";
			this.layoutControlItem2.TextSize = new Size(0, 0);
			this.layoutControlItem2.TextToControlDistance = 0;
			this.layoutControlItem2.TextVisible = false;
			this.layoutControlGroup3.CustomizationFormText = "layoutControlGroup3";
			this.layoutControlGroup3.GroupBordersVisible = false;
			this.layoutControlGroup3.Location = new Point(0, 55);
			this.layoutControlGroup3.Name = "layoutControlGroup3";
			this.layoutControlGroup3.Padding = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0);
			this.layoutControlGroup3.Size = new Size(961, 620);
			this.layoutControlGroup3.Text = "layoutControlGroup3";
			this.layoutControlGroup3.TextVisible = false;
			base.AutoScaleDimensions = new SizeF(6f, 13f);
			base.AutoScaleMode = AutoScaleMode.Font;
			base.Controls.Add(this.layoutControl1);
			base.Name = "xucBasicListSearchProduct";
			base.Size = new Size(961, 681);
			((ISupportInitialize)this.imageCollection2).EndInit();
			((ISupportInitialize)this.layoutControl1).EndInit();
			this.layoutControl1.ResumeLayout(false);
			((ISupportInitialize)this.layoutControlGroup1).EndInit();
			((ISupportInitialize)this.splitterItem1).EndInit();
			((ISupportInitialize)this.layoutControlGroup2).EndInit();
			((ISupportInitialize)this.layoutControlItem2).EndInit();
			((ISupportInitialize)this.layoutControlGroup3).EndInit();
			base.ResumeLayout(false);
		}
	}
}
